package com.example.demo.builderpattern;

import com.example.demo.builderpattern.item.burger.ChickenBurger;
import com.example.demo.builderpattern.item.burger.VegBurger;
import com.example.demo.builderpattern.item.colddrink.Coke;
import com.example.demo.builderpattern.item.colddrink.Pepsi;

/**
 * @author :xie
 * Email: 1487471733@qq.com
 * Date: 2018/9/10
 * Time: 18:08
 * Describe:
 */
public class MealBuilder {

    public Meal prepareVegMeal (){
        System.out.println("我是builder，创建了一个订单");
        Meal meal = new Meal();
        meal.addItem(new VegBurger());
        meal.addItem(new Coke());
        return meal;
    }

    public Meal prepareNonVegMeal (){
        Meal meal = new Meal();
        meal.addItem(new ChickenBurger());
        meal.addItem(new Pepsi());
        return meal;
    }
}
